<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of SparqlResult
 *
 * @author julien.pernot
 */
class SparqlResult {
    
    private $subject;
    private $object;
    private $property;
    
    public function __construct(stdClass $result)
    {   
        var_dump($result);
        if(isset($result->s->value))
        {
            $this->subject = $result->s->value;
        }
        
        if(isset($result->o->value))
        {
            $this->object = $result->o->value;
        }
        
        if(isset($result->p->value))
        {
            $this->property = $result->p->value;
        }
    }
    
    public function getSubject() {
        return $this->subject;
    }

    public function getObject() {
        return $this->object;
    }

    public function getProperty() {
        return $this->property;
    }

    public function setSubject($subject) {
        $this->subject = $subject;
        return $this;
    }

    public function setObject($object) {
        $this->object = $object;
        return $this;
    }

    public function setProperty($property) {
        $this->property = $property;
        return $this;
    }


}
